﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;

namespace Enough.Converter
{
    //[ValueConversion(typeuof(int), typeof(Visibility))]
    public class ZeroToVisibilityConverter : IValueConverter
    {

        public object Convert(object value, Type targetType, object parameter, string culture)
        {
            int number = System.Convert.ToInt32(value);

            if (number == 0)
            {
                return Visibility.Visible;
            }
            else
            {
                return Visibility.Collapsed;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, string culture)
        {
            throw new NotImplementedException();
        }

    }
    
}
